<?php

// mbilling/BillingBundle/Entity/bonusesTable.php
namespace mbilling\BillingBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * @ORM\Entity
 */
class bonusesTable
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $created_at;

    /**
     * @ORM\Column(type="datetime", nullable="TRUE")
     */
    protected $used_at;
    
    /**
     * @ORM\Column(type="integer")
     */
    protected $user_id;

    /**
     * @ORM\Column(type="integer")
     */
    protected $bonus_id;
    
    /**
     * @ORM\Column(type="boolean")
     */
    protected $is_active;

    public function __construct()
    {
        $this->setCreatedAt(new \DateTime());
    }
    
    public function setId($id)
    {
        $this->id = $id;
    }
    public function getId()
    {
        return $this->id;
    }

    public function setCreatedAt($created_at)
    {
        $this->created_at = $created_at;
    }
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function setUsedAt($used_at)
    {
        $this->used_at = $used_at;
    }
    public function getUsedAt()
    {
        return $this->used_at;
    }

    public function setUserId($user_id)
    {
        $this->user_id = $user_id;
    }
    public function getUserId()
    {
        return $this->user_id;
    }

    public function setBonusId($bonus_id)
    {
        $this->bonus_id = $bonus_id;
    }
    public function getBonusId()
    {
        return $this->bonus_id;
    }
    
    public function setIsActive($is_active)
    {
        $this->is_active = $is_active;
    }
    public function getIsActive()
    {
        return $this->is_active;
    }
    
    public function initDefaultEntity()
    {
        $this->setUserId('1');
        $this->setBonusId('1');
        $this->setIsActive('1');
        return $this;
    }
}
?>
